﻿namespace ConsoleApp7
{
    internal class Program
    {
        static void Main(string[] args)
        {
            List<string> passwords = GeneratePasswords();
            Console.WriteLine($"共生成{passwords.Count}个密码:");
            foreach (string password in passwords)
            {
                Console.WriteLine(password);
            }

        }
        static List<string> GeneratePasswords()
        {
            List<string> passwords = new List<string>();
            for (int i = 0; i < 10; i++)
            {
                for (int j = 0; j < 10; j++)
                {
                    for (int k = 0; k < 10; k++)
                    {
                        for (int l = 0; l < 10; l++)
                        {
                            string password = $"{i}{j}{k}{l}";
                            passwords.Add(password);
                        }
                    }
                }
            }
            return passwords;
        }
    }
}
